pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let num = num_str.split("(").nth(0).unwrap();
    let origin_base: u32 = num_str.rsplit("(").next().unwrap().replace(")", "").parse().unwrap();

    // 将数字转为10进制
    let mut num = usize::from_str_radix(num, origin_base).unwrap();

    // 10进制转为目标禁止
    let chars = "0123456789abcdef";

    let mut target = String::new();
    while num > 0 {
        // 计算余数
        let remainder = num % to_base as usize;
        target.push(chars.chars().nth(remainder).unwrap());
        // 计算商
        num /= to_base as usize;
    }

    target.chars().rev().collect()
}
